<!-- <style>
  p {
    margin: 20px 0;
    background: lightblue;
  }
  .bfc-container {
    overflow: hidden; /* 创建 BFC */
  }
</style>
<p>段落1</p>
<div class="bfc-container">
  <p>段落2（在 BFC 中）</p>
</div>
<p>段落3</p> -->

<style>
  .sidebar {
    float: left;
    width: 200px;
    height: 200px;
    background: lightblue;
  }
  .main-content {
    overflow: auto; /* 创建 BFC */
    background: lightgreen;
  }
</style>
<div class="sidebar">侧边栏</div>
<div class="main-content">主内容区域会自适应剩余宽度，不会与侧边栏重叠。</div>
